{include file="public/header" /}
<body style="padding-top: 0">
<ul class="draw-to-list">
    <li data-type="{if $user.alipay_image && $user.alipay_name}支付宝{/if}">
        <div class="top">
            <p class="flex-center">
                <img src="/static/index/img/icon4.png" alt="">
            </p>
            <p class="center">支付宝</p>
            <label for="check">
                <img src="/static/index/img/icon6.png" alt="">
            </label>
            <input type="radio" id="check">
        </div>
        <div class="news">
            <p>姓名：{:$user.alipay_name?substrCut($user.alipay_name):''}</p>
        </div>
    </li>
    <li data-type="{if $user.wechat_name && $user.wechat_image}微信{/if}">
        <div class="top">
            <p class="flex-center">
                <img src="/static/index/img/icon3.png" alt="">
            </p>
            <p class="center">微信</p>
            <label for="check1">
                <img src="/static/index/img/icon6.png" alt="">
            </label>
            <input type="radio" id="check1">
        </div>
        <div class="news">
            <p>姓名：{:$user.wechat_name?substrCut($user.wechat_name):''}</p>
        </div>
    </li>
    <li data-type="{if $user.bank_name && $user.bank_open && $user.bank_account_name && $user.bank_number}银行卡{/if}">
        <div class="top">
            <p class="flex-center">
                <img src="/static/index/img/icon17.png" alt="">
            </p>
            <p class="center">银行卡</p>
            <label for="check2">
                <img src="/static/index/img/icon6.png" alt="">
            </label>
            <input type="radio" id="check2">
        </div>
        <div class="news">
            <p>银行：{$user.bank_name?:'未绑定'}</p>
            <p>卡号：{:$user.bank_number?strreplace($user.bank_number):''}</p>
        </div>
    </li>
</ul>

<p class="save save-fixed upd-save">确定</p>
<p class="save save-fixed upd-save payment">管理收款方式</p>
</body>
{include file="public/footer"/}
<script>
    $('.draw-to-list li').click(function () {
        $(this).find('label img').attr('src', '/static/index/img/icon7.png')
        $(this).siblings().find('label img').attr('src', '/static/index/img/icon6.png')
        var type = $(this).attr('data-type');
        switch (type) {
            case "支付宝":
                parent.renderLoad(type,'/static/index/img/icon4.png','支付宝（{:$user.alipay_name?substrCut($user.alipay_name):''}）')
                break;
            case "微信":
                parent.renderLoad(type,'/static/index/img/icon3.png','微信（{:$user.wechat_name?substrCut($user.wechat_name):''}）')
                break;
            case "银行卡":
                parent.renderLoad(type,'/static/index/img/icon17.png','银行卡（{:$user.bank_number?strreplace($user.bank_number):''}）')
                break;
            case "USDT":
                $(this).find('label img').attr('src', '/static/index/img/icon7.png')
                $(this).siblings().find('label img').attr('src', '/static/index/img/icon6.png')
                parent.renderLoad(type,'/static/index/img/usdt.png','USDT（{:$user.usdt_address?substrCut($user.usdt_address):''}）')
                break;
            default:
                layer.msg('请先完善后在使用');
        }

    })
    $('.payment').click(function (){
        parent.location.href='{:url("user/methodList")}';
    });
</script>
</html>